//
//  MTEmailShow6ViewController.h
//  YuchBox
//
//  Created by Ivan on 11-11-4.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Email.h"
#import "StateViewer.h"
#import "MTEmailViewController.h"
#define CALLBACK_CHANGE_ICON    100

@class AttachmentReaderViewController;
@class MTEmailViewController;

@protocol MTEmailShow6Delegate <NSObject>
- (void)callback:(NSInteger)callbackType param:(id)param;
@end

@interface MTEmailShow6ViewController : UITableViewController <UIWebViewDelegate, UINavigationControllerDelegate, StateViewerDelegate>
{
    NSArray *_cellParams;
    
    UIWebView   * _contentHtmlView;
    NSIndexPath * _indexPathOfContentHtml;
    
    UILabel     * _contentLabel;
    
    Email       *_currentEmail;
    NSInteger   _currentEmailIndex;
    Boolean     _isSameEmail;
    UITableViewCell * _unCompleteCell;
    
    MTEmailViewController *_currentDelegate;
    
    AttachmentReaderViewController *_attachmentReaderViewController;
}

@property (weak, nonatomic)  MTEmailViewController *currentDelegate;
- (void)loadEmail:(Email *)email;

@end


// 
// class
//
@interface AttachmentReaderViewController : UIViewController 
{
    UIScrollView    * _scrollView;
    NSInputStream   *_fileInputStream;
}

- (id)initWithAttachment:(Attachment *)attachment;
- (void)loadAttachment:(Attachment *)attachment;
@end